package com.wsd.jing.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.wsd.jing.entity.UserRole;
import com.wsd.jing.dto.UserRoleDTO;
import com.wsd.jing.request.CommonRequest;

import java.util.List;
import java.util.Map;

/**
 * All rights Reserved, Designed By www.tom.com
 *
 * @author tom
 * @version 1.0.0
 * @projectName: jing
 * @packageName: com.wsd.jing.service
 * @className: IUserRoleService
 * @description: 用户角色关联服务类
 * @createDate 2022-11-20 07:41
 * @copyright 2022-11-20 07:41 www.tom.com Inc. All rights reserved.
 */
public interface IUserRoleService extends IService<UserRole> {

    /**
     * @param userRole:用户角色关联
     * @return Boolean
     * @author tom
     * @description 新增用户角色关联
     * @createDate 2022-11-20 07:41
     */
    Boolean insertUserRole(UserRole userRole);

    /**
     * @param userRole:用户角色关联
     * @return Boolean
     * @author tom
     * @description 修改用户角色关联
     * @createDate 2022-11-20 07:41
     */
    Boolean updateUserRole(UserRole userRole);

    /**
     * @param id:id
     * @return Boolean
     * @author tom
     * @description 删除用户角色关联
     * @createDate 2022-11-20 07:41
     */
    Boolean deleteUserRole(Integer id);

    /**
     * @param ids:id
     * @return Boolean
     * @author tom
     * @description 批量删除用户角色关联
     * @createDate 2022-11-20 07:41
     */
    Boolean deleteUserRoles(String ids);

    /**
     * @param id:id
     * @return UserRole
     * @author tom
     * @description 查询用户角色关联
     * @createDate 2022-11-20 07:41
     */
    UserRole getUserRole(Integer id);

    /**
     * @param commonRequest:排序参数
     * @param userRole:用户角色关联
     * @return List<UserRole>
     * @author tom
     * @description 查询用户角色关联列表
     * @createDate 2022-11-20 07:41
     */
    List<UserRole> listUserRoles(CommonRequest commonRequest, UserRole userRole);

    /**
     * @param commonRequest:分页参数
     * @param userRoleDto:用户角色查询参数
     * @return Map<String, Object>
     * @author tom
     * @description 分页查询用户角色关联列表
     * @createDate 2022-11-20 07:41
     */
    Map<String, Object> listPageUserRoles(CommonRequest commonRequest, UserRoleDTO userRoleDto);

    /**
     * @param commonRequest:分页参数
     * @param userRoleDto:用户角色查询参数
     * @return Map<String, Object>
     * @author tom
     * @description 分页查询角色可选用户
     * @createDate 2022-11-20 07:41
     */
    Map<String, Object> listPageUsers(CommonRequest commonRequest, UserRoleDTO userRoleDto);

    /**
     * @param userRoleList:用户角色关联列表
     * @return Boolean
     * @author tom
     * @description 批量新增用户角色关联
     * @createDate 2022/11/27 21:31
     */
    Boolean insertBatchUserRoles(List<UserRole> userRoleList);
}
